#include<stdio.h> 

int Fun(int x)
{
	int sum = 0;
	while(x != 0)
	{
		sum = sum*10 + x%10;
		x/=10;
	}
	return sum;
}
int main()
{
	int m,n;
	scanf("%d %d",&m,&n);
	int sub1 = m*n;
	int m2 =Fun(m),n2 =Fun(n);
	int sub2 = m2*n2;
	if(sub1 == sub2)
		printf("%d*%d = %d*%d",m,n,m2,n2);
	else
		printf("%d*%d != %d*%d",m,n,m2,n2);
	return 0;
}
